package com.mdc.mansion.core.modules.order;

import java.io.IOException;
import java.text.ParseException;
import java.util.List;
import java.util.Map;

import com.mdc.mansion.core.modules.pay.dto.AltoPayQryResult;
import com.mdc.mansion.core.modules.pay.dto.AltoRefundQryResult;
import com.mdc.mansion.dataaccess.common.service.BaseService;
import com.mdc.mansion.dataaccess.modules.basedata.entity.RestaurantOrderDTO;
import com.mdc.mansion.dataaccess.modules.order.entity.RestaurantOrder;
import com.mdc.mansion.dataaccess.modules.order.vo.RestaurantOrderVo;
import com.mdc.mansion.dataaccess.modules.restaurant.entity.Restaurant;
import com.mdc.mansion.dataaccess.modules.restaurant.vo.RestaurantTableVo;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * 餐厅订单信息Service
 * @author mingdongc
 * @version 2018-01-01
 */
public interface RestaurantOrderService extends  BaseService<RestaurantOrder> {

    void submit(String data);

    void urgent(String data);

    Map<String,Object> getNotCheckOutOrderItems(String data);

    void cancel(String data);

    void orderAddItem(String data);

	void changeTable(RestaurantOrder restaurantOrder);

	Map<String, Object> queryByOrder(RestaurantOrderVo restaurantOrderVo) ;

	Map<String, Object> billCheckOut(RestaurantOrder restaurantOrder) ;

	void refund(RestaurantOrder restaurantOrder);

	Map<String, Object> history(RestaurantOrderVo restaurantOrderVo);

	List<RestaurantTableVo> getOrderStatusList(Restaurant restaurant, String pageSize, String pageNo);

	void orderCancel(String data, String userType);

    void affirm(String data);
    
    List<Map<String, Object>> getTotalAmountList(Map<String, Object> parameterMap);
    
	List<Map<String, Object>> getTotalAmountListByMonth(Map<String, Object> parameterMap);
    
    List<Map<String, Object>> getTotalAmountListByYear(Map<String, Object> parameterMap);

	List<Map<String, Object>> getCategoryAmountList(Map<String, Object> parameterMap);

	List<Map<String, Object>> getDishesAmountList(Map<String, Object> parameterMap);

	List<Map<String, Object>> getWaitersTotalMoney(Map<String, Object> parameterMap);

	List<Map<String, Object>> getCashierTotalMoney(Map<String, Object> parameterMap);

	List<Map<String, Object>>getCancelDishesTotalMoney(Map<String, Object> parameterMap);

	List<Map<String, Object>> getCancelOrderTotalMoney(Map<String, Object> parameterMap);

	List<RestaurantOrderDTO> findrestaurantCount(RestaurantOrderDTO restaurantOrderDTO);

	List<RestaurantOrderDTO> findStaffCount(RestaurantOrderDTO restaurantOrderDTO);

	List<RestaurantOrderDTO> findOrderCount(RestaurantOrderDTO restaurantOrderDTO);

	List<RestaurantOrderDTO> getTotalAmountList(RestaurantOrderDTO restaurantOrderDTO);

	List<RestaurantOrderDTO> getCategoryAmountList(RestaurantOrderDTO restaurantOrderDTO);

	List<RestaurantOrderDTO> getDishesAmountList(RestaurantOrderDTO restaurantOrderDTO);
	
	
	List<Map<String,Object>> getTotalAmountListByAllYear(Map<String,Object> parameterMap);
	
	Map<String,Object> getPayJson(RestaurantOrder restaurantOrder) throws Exception;
	
	void OrderPayBack(HttpServletRequest request, HttpServletResponse response) throws IOException, ParseException;
	
	void preRefundJson(RestaurantOrder restaurantOrder) throws Exception;
	
	void OrderRefundBack(HttpServletRequest request, HttpServletResponse response) throws IOException;
	
	AltoPayQryResult qryPayLog(String data) throws Exception;
	
	AltoRefundQryResult qryRefundLog(String data) throws Exception;
}

